package de.staxx6.bomber.box;

import com.jme3.math.Vector2f;
import com.jme3.math.Vector3f;
import com.jme3.scene.Node;
import com.jme3.scene.shape.Box;

import de.staxx6.bomber.Stats;

public abstract class BoxBomber {
	
	protected final String type;
	protected final float x;
	protected final float y;
	protected final Box box;
	protected final int playerOwner;
	protected Node boxNode = new Node("Box Node");
	
	public BoxBomber(final float newX, final float newY, final int newPlayerOwner, final String newType) {
		this.type = newType;
		this.x = newX;
		this.y = newY;
		this.playerOwner = newPlayerOwner;
		
		/* init box */
		box = new Box(new Vector3f(x, y, 1.5f), 0.5f, 0.5f, 0.5f);
		Stats.TOTALBOXES++;
	}
	
	public BoxBomber(final float newX, final float newY, final String newType) {
		this.type = newType;
		this.x = newX;
		this.y = newY;
		this.playerOwner = 5;
		/* init box */
		box = new Box(new Vector3f(x, y, 1.5f), 0.5f, 0.5f, 0.5f);
		Stats.TOTALBOXES++;
	}
	
	public String getType() {
		return type;
	}
	
	public Vector2f getBoxPosition() {
		Vector2f vec2 = new Vector2f(x, y);
		return vec2;
	}
	
	public Node getNode() {
		return boxNode;
	}
	
	public int getPlayerNumber() {
		return playerOwner;
	}
	
	public void update(float delta) {}
}
